﻿namespace FMWare.Core.Base
{
	public abstract class Item
	{
		#region Public Properties

		/// <summary>
		/// Gets or sets the unique id.
		/// </summary>
		/// <value>The unique id.</value>
		public int UniqueId { get; internal set; }

		#endregion

		#region Internal Properties

		/// <summary>
		/// Gets or sets the export data line.
		/// </summary>
		/// <value>The export data.</value>
		internal abstract string ExportData { get; }

		/// <summary>
		/// Gets or sets the reader.
		/// </summary>
		/// <value>The reader.</value>
		internal BinaryReader Reader { get; set; }

		/// <summary>
		/// Gets or sets the writer.
		/// </summary>
		/// <value>The writer.</value>
		internal BinaryWriter Writer { get; set; }

		#endregion

		#region Internal Methods

		/// <summary>
		/// Reads data with the specified reader.
		/// </summary>
		/// <param name="reader">The reader.</param>
		internal abstract void Read(BinaryReader reader);

		/// <summary>
		/// Writes data with the specified writer.
		/// </summary>
		/// <param name="writer">The writer.</param>
		internal abstract void Write(BinaryWriter writer);

		#endregion
	}
}